'use strict';
const Controller = require('egg').Controller;

class SetinfoController extends Controller {
    async create() {
        const { ctx, service } = this;
        const userid = ctx.state.user.data._id;
        const infodata = ctx.request.body;
        const res = await service.user.editinfo(userid, infodata);
        ctx.body = res;
    }
}

module.exports = SetinfoController;